package com.jame.aop;

import com.jame.typeenum.AnnotationType;


import java.lang.reflect.Method;

/**
 * @author : Jame
 * @date : 2021-07-02 10:13
 **/
public class AopResult {
    /**
     * 修饰类型
     */
    private AnnotationType annotationType;
    /**
     * 增强使用的方法
     */
    private Method method;
    /**
     * 增强使用方法的类
     */
    private Object instance;
    /**
     * 切入点,存放注解上的*.*.*.*
     */
    private String value;

    /**
     * 解析完注解上的切入点
     */
    private ExecuteClassParticulars executeClassParticulars;

    public AopResult() {
        super();
    }

    public AopResult(AnnotationType annotationType, Method method, Object instance, String value, ExecuteClassParticulars executeClassParticulars) {
        this.annotationType = annotationType;
        this.method = method;
        this.instance = instance;
        this.value = value;
        this.executeClassParticulars = executeClassParticulars;
    }

    public AnnotationType getAnnotationType() {
        return annotationType;
    }

    public void setAnnotationType(AnnotationType annotationType) {
        this.annotationType = annotationType;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Object getInstance() {
        return instance;
    }

    public void setInstance(Object instance) {
        this.instance = instance;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public ExecuteClassParticulars getExecuteClassParticulars() {
        return executeClassParticulars;
    }

    public void setExecuteClassParticulars(ExecuteClassParticulars executeClassParticulars) {
        this.executeClassParticulars = executeClassParticulars;
    }

    @Override
    public String toString() {
        return "AopResult{" +
                "annotationType=" + annotationType +
                ", method=" + method +
                ", instance=" + instance +
                ", value='" + value + '\'' +
                ", executeClassParticulars=" + executeClassParticulars +
                '}';
    }
}
